import { createUniqueId } from '@/utils/common'

const process = {
    processId: `process_${createUniqueId()}`
}

export default function () {
    return `<?xml version="1.0" encoding="UTF-8"?>
  <definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:bioc="http://bpmn.io/schema/bpmn/biocolor/1.0" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:flowable="http://flowable.org/bpmn" targetNamespace="http://www.flowable.org/processdef">
    <process id="${process.processId}" name="name_f20c56f8-1097">
      <startEvent id="startNode1" name="申请人">
        <outgoing>Flow_0vehl84</outgoing>
      </startEvent>
      <task id="Activity_0oft5yc" name="审批">
        <incoming>Flow_0vehl84</incoming>
        <outgoing>Flow_1oaw574</outgoing>
      </task>
      <sequenceFlow id="Flow_0vehl84" name="" sourceRef="startNode1" targetRef="Activity_0oft5yc" />
      <endEvent id="Event_1irwra2" name="结束">
        <incoming>Flow_1oaw574</incoming>
      </endEvent>
      <sequenceFlow id="Flow_1oaw574" name="" sourceRef="Activity_0oft5yc" targetRef="Event_1irwra2" />
    </process>
    <bpmndi:BPMNDiagram id="BPMNDiagram_flow">
      <bpmndi:BPMNPlane id="BPMNPlane_flow" bpmnElement="${process.processId}">
        <bpmndi:BPMNEdge id="Flow_0vehl84_di" bpmnElement="Flow_0vehl84">
          <di:waypoint x="270" y="115" />
          <di:waypoint x="320" y="115" />
        </bpmndi:BPMNEdge>
        <bpmndi:BPMNEdge id="Flow_1oaw574_di" bpmnElement="Flow_1oaw574">
          <di:waypoint x="420" y="115" />
          <di:waypoint x="472" y="115" />
        </bpmndi:BPMNEdge>
        <bpmndi:BPMNShape id="BPMNShape_startNode1" bpmnElement="startNode1" bioc:stroke="">
          <omgdc:Bounds x="240" y="100" width="30" height="30" />
          <bpmndi:BPMNLabel>
            <omgdc:Bounds x="237" y="137" width="34" height="14" />
          </bpmndi:BPMNLabel>
        </bpmndi:BPMNShape>
        <bpmndi:BPMNShape id="Activity_0oft5yc_di" bpmnElement="Activity_0oft5yc">
          <omgdc:Bounds x="320" y="75" width="100" height="80" />
        </bpmndi:BPMNShape>
        <bpmndi:BPMNShape id="Event_1irwra2_di" bpmnElement="Event_1irwra2">
          <omgdc:Bounds x="472" y="97" width="36" height="36" />
          <bpmndi:BPMNLabel>
            <omgdc:Bounds x="479" y="140" width="22" height="14" />
          </bpmndi:BPMNLabel>
        </bpmndi:BPMNShape>
      </bpmndi:BPMNPlane>
    </bpmndi:BPMNDiagram>
  </definitions>
    `
}
